<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>

        // for(初始值;条件;循环体之后执行的代码){}    必须有两个分号

        // 最简单的死循环
        // for (; ;) {
        //     document.write(1);
        // }

        // 改写的跟while语句一样
        var i = 0;
        for (; i < 10;) {
            // i++;
            console.log(666);
            i++;
        }

    </script>

</body>

</html>